﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VideoClub.DS.classes.sp;
using VideoClub.EN.classes;

namespace VideoClub.BS.classes
{
   public  class Bs_Del
    {
        Sp_Del_Handler objhande = new Sp_Del_Handler();

        public int delActor(Actor actor, ref string log)
        {
            int rowsaffected = 0;
            try
            {
                rowsaffected = objhande.delActor(actor, ref log);
                return rowsaffected;
            }
            catch (Exception ex)
            {
                log += ex.Message + ex.StackTrace + ex.Source;
                throw ex;
            }
        }


        public int delAlquiler(Alquiler alquiler, ref string log)
        {
            int rowsaffected = 0;
            try
            {
                rowsaffected = objhande.delAlquiler(alquiler, ref log);
                return rowsaffected;
            }
            catch (Exception ex)
            {
                log += ex.Message + ex.StackTrace + ex.Source;
                throw ex;
            }
        }

        public int delCategoriaPeli(CategoriaPelicula categoriapelicula, ref string log)
        {
            int rowsaffected = 0;
            try
            {
                rowsaffected = objhande.delCategoriaPeli(categoriapelicula, ref log);
                return rowsaffected;
                }
            catch (Exception ex)
            {
                log += ex.Message + ex.StackTrace + ex.Source;
                throw ex;
            }
        }

        public int delNacionalidad(Nacionalidad nacionalidad, ref string log)
        {
            int rowsaffected = 0;
            try
            {
                rowsaffected = objhande.delNacionalidad(nacionalidad, ref log);
                return rowsaffected;
            }
            catch (Exception ex)
            {
                log += ex.Message + ex.StackTrace + ex.Source;
                throw ex;
            }
        }

        public int delPelicula(Pelicula pelicula, ref string log)
        {
            int rowsaffected = 0;
            try
            {
                rowsaffected = objhande.delPelicula(pelicula, ref log);
                return rowsaffected;
            }
            catch (Exception ex)
            {
                log += ex.Message + ex.StackTrace + ex.Source;
                throw ex;
            }
        }


        public int delPeliImgFile(PeliImageFile peliimgfile, ref string log)
        {
            int rowsaffected = 0;
            try
            {
                rowsaffected = objhande.delPeliImgFile(peliimgfile, ref log);
                return rowsaffected;
            }
            catch (Exception ex)
            {
                log += ex.Message + ex.StackTrace + ex.Source;
                throw ex;
            }
        }


        public int delSolicitud(Solicitud solicitud, ref string log)
        {
            int rowsaffected = 0;
            try
            {
                rowsaffected = objhande.delSolicitud(solicitud, ref log);
                return rowsaffected;
            }
            catch (Exception ex)
            {
                log += ex.Message + ex.StackTrace + ex.Source;
                throw ex;
            }
        }


        public int delTipoUsuario(TipoUsuario tipousuario, ref string log)
        {
            int rowsaffected = 0;
            try
            {
                rowsaffected = objhande.delTipoUsuario(tipousuario, ref log);
                return rowsaffected;
            }
            catch (Exception ex)
            {
                log += ex.Message + ex.StackTrace + ex.Source;
                throw ex;
            }
        }

        public int delUsuario(Usuario usuario, ref string log)
        {
            int rowsaffected = 0;
            try
            {
                rowsaffected = objhande.delUsuario(usuario, ref log);
                return rowsaffected;
            }
            catch (Exception ex)
            {
                log += ex.Message + ex.StackTrace + ex.Source;
                throw ex;
            }
        }


        public int delVideoPelicula(VideoPelicula videopelicula, ref string log)
        {
            int rowsaffected = 0;
            try
            {
                rowsaffected = objhande.delVideoPelicula(videopelicula, ref log);
                return rowsaffected;
            }
            catch (Exception ex)
            {
                log += ex.Message + ex.StackTrace + ex.Source;
                throw ex;
            }
        } 

    }
}
